package GUI;

import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.border.Border;

@SuppressWarnings("serial")
public class EditPanel extends JPanel implements ActionListener{
	public static String currentEditMode;
	public EditPanel(){
		//row, column
		setLayout(new GridLayout(1, 0));
		Border border = BorderFactory.createTitledBorder("Edit");
		setBorder(border);
		
		ButtonGroup group = new ButtonGroup();
		JRadioButton moveRadioB = new JRadioButton("Move");
		add(moveRadioB);
		group.add(moveRadioB);
		moveRadioB.addActionListener(this);

		JRadioButton scaleRadioB = new JRadioButton("Scale");
		add(scaleRadioB);
		group.add(scaleRadioB);
		scaleRadioB.addActionListener(this);

		JRadioButton removeRadioB = new JRadioButton("Remove");
		add(removeRadioB);
		group.add(removeRadioB);
		removeRadioB.addActionListener(this);
	}
    /** Listens to the radio button change. */
	public void actionPerformed(ActionEvent e) {
		currentEditMode = e.getActionCommand();
	}
}
